#ifndef STRETCHFEATURE_H
#define STRETCHFEATURE_H
/*
拉伸运算存储变换Id、变换类型、目标对象、变换结果Id、变换参数等
*/
#include "BaseFeature.h"
#include <RWTools.h>
class StretchFeature : public BaseFeature {
public:
	StretchFeature();
	~StretchFeature();

public:
	//获取私有变量
	int getStretchId();
	int getStretchType();
	int getResultId() override;
	BaseFeature* getTargetFeature() override;
	int getSubShapeIndex();
	gp_Vec getStretchVec();

	//设置私有变量
	void setStretchId(int stretchId);
	void setStretchType(int stretchType);
	void setResultId(int resultId);
	void setTargetFeature(BaseFeature* targetFeature);
	void setSubShapeIndex(int index);
	void setStretchVec(gp_Vec vec);
	void AddOperation(BaseFeature* feature) override {
		if (this->targetFeature->getFeatureType() <= 5) {
			this->targetFeature->AddOperationToList(feature);
		}
		else {
			this->targetFeature->AddOperation(feature);
		}
	};
private:
	int stretchId;
	//0:vertex 1:edge 2:face
	int stretchType;
	int resultId;
	//选择拉伸对象
	int subShapeIndex;
	//拉伸向量
	gp_Vec stretchVec;
	//保存拉伸运算前父对象的拓扑数据
	//判断对象是否是不规则对象（即是操作子类），若是则先重做操作获取不规则对象
	BaseFeature* targetFeature;
};
#endif

